# $Id: bashrc,v 1.1.1.1 2010/11/06 11:12:37 pgurumur Exp $
# Copyright (c) 2009 Prabhu Gurumurthy <pgurumur@gmail.com>
# 
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
# 
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#       
# This file is read each time a login shell is started.
# All other interactive shells will only read .bashrc; this is particularly
# important for language settings, see below.
#
# __version__  = $Revision: 3ad54c8dbd58 $
# __author__   = $Author: pgurumur $
# __modified__ = $Date$

test -z "$PROFILEREAD" && . /etc/profile || true

SYSTEM=`hostname -s`
export DICT="/usr/share/dict/words"
export MANPATH=$MANPATH:/usr/man:/usr/X11R6/man:/usr/local/share/man
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/usr/X11R6/lib
export LS_OPTIONS="-NFhv -T 0 --color=tty"
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/lib/qt3/bin:/opt/icecream/bin
export VISUAL=vim
export EDITOR=vim
export CVS_RSH=ssh
export LANG="C"
export LESS="-P?fFile\: %f ?lLines\:%l\/%L %p\% Page\:%d Size\:%s\B"
export PAGER=less
export MANPAGER=less
export SCREENRC=$HOME/.screenrc.${SYSTEM}
export SCREENDIR=$HOME/.screen
export TEMP=/tmp
export TEXDOCVIEW_dvi='(kdvi %s) &'
export TEXDOCVIEW_ps='(kghostview %s) &'
export TEXDOCVIEW_html='(mozilla -remote '"'(%s)'"' 2>/dev/null || mozilla %s) &'
export WWW_HOME=http://www.google.com

alias ping='ping -n'
alias ls='ls $LS_OPTIONS'
alias mv='mv -i'
alias cp='cp -i'
alias rm='rm -i'

set -o ignoreeof
set -o noclobber

shopt -s cdspell
shopt -s cmdhist
shopt -s extglob
shopt -s hostcomplete
shopt -s interactive_comments
shopt -s promptvars

TITLEBAR='\[]0;\u@\h (\l):\W\]'
if [ "$TERM" = "screen" ]; then 
   export TERM=xterm 
   stty erase '' 
fi

PROMPT="$"

if [ $TERM = "xterm" ]; then
   PS1="$TITLEBAR\h: [\w]\n[\!]$PROMPT "
   PS2="$TITLEBAR[\W]$ "
   PS4="[\W]+ "
   export TERM=xterm
else
   PS1="\h: [\w]\n [\!]$PROMPT "
   PS2="[\W]$ "
   PS4="[\W]+ "
fi

export PS1 PS2 PS4

[ -f ${HOME}/.bash/bashrc.completions ] && . ${HOME}/.bash/bashrc.completions
